package api

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/golangblogs/gojwt"
	"soul/api/handler"
)

func UserLogin(c *gin.Engine) {
	user := c.Group("/user")
	{
		user.POST("/sendSms", handler.SendSms)  //验证码
		user.POST("/login", handler.Login)      //验证码登录
		user.GET("/bookLike", handler.BookLike) //点赞排行
		user.Use(jwt.JWTAuth("2209a"))
		user.POST("/upload", handler.Upload)                       //文件上传
		user.GET("/chat", handler.Chat)                            //聊天
		user.POST("/addBok", handler.AddBook)                      //发布
		user.GET("/follow", handler.Follow)                        //关注
		user.POST("/releaseLike", handler.ReleaseLike)             //点赞
		user.POST("/comment", handler.Comments)                    //评论
		user.POST("/reply", handler.Reply)                         //回复
		user.GET("/listLike", handler.ListLike)                    //回溯点赞评论
		user.GET("/videoList", handler.VideoList)                  //视频查询总点赞量
		user.POST("/addGroup", handler.AddGroup)                   //创建群聊
		user.POST("/delMember", handler.DelMember)                 //移除群员或添加群员
		user.POST("/setAdministrators", handler.SetAdministrators) //分配管理
		user.POST("/setJurisdiction", handler.SetJurisdiction)     //设置权限
		user.POST("/delGroup", handler.DelGroup)                   //解散群聊

	}
}
